package com.atguigu.tingshu.album.api;

import com.atguigu.tingshu.album.service.TestService;
import com.atguigu.tingshu.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Wu Xingbin
 * @date 2023/11/27/16:45
 */
@RestController
@RequestMapping("api/album/test")
public class TestController {
    /**
     * 注入服务层
     */
   @Autowired
    private TestService testService;

    /**
     * 测试分布式锁
     */
    @GetMapping("testLock")
    public Result testLock(){
        testService.testLock();
        return Result.ok();
    }
}
